import request from '@/utils/request'

// // 获取角色列表
export const getRoleList = params => request.get('/sys/role', { params })

// 修改角色
export const update = data => request.put(`/sys/role/${data.id}`, data)

// 删除角色
export const delRole = id => request.delete(`/sys/role/${id}`)

// 新增角色
export const addRole = data => request.post('/sys/role', data)

// 设置权限
export const assignPrem = data => request.put('/sys/role/assignPrem', data)

// 获取角色详情
export const getRoleInfo = id => request.get(`/sys/role/${id}`)

// 获取-已启用的角色列表
export const getRole = id => request.get(`/sys/role/list/enabled`)
